import instance from "@/utils/request";
enum API{
  ALLPERMISSTION_URL='/admin/acl/permission',  // 全部菜单
  ADDMENU_URL='/admin/acl/permission/save',
  UPDATE_URL='/admin/acl/permission/update',
  DELETEMENU_ERL='/admin/acl/permission/remove'
}

// 获取所有菜单
export const AllPermissionAPI=()=>{
  return instance.get(API.ALLPERMISSTION_URL)
}

// 添加
export const AddMenuAPI=(data:any)=>{
  return instance.post(API.ADDMENU_URL,data)
}

// 编辑
export const EditeMenuAPI=(data:any)=>{
  return instance.put(API.UPDATE_URL,data)
}

// 删除
export const DeleteMenuAPI=(id:number)=>{
  return instance.delete(API.DELETEMENU_ERL+`/${id}`)
}
